module.exports={
    chainWebpack:config =>{
        config.when(process.env.NODE_ENV === 'production',config =>{
            config.entry('app').clear().add('./src/main-prod.js')

            config.set('externals',{
                vue:'Vue',
                'vue-router': 'VueRouter',
                axios:'axios',
                lodash:'_',
                echarts:'echarts',
                'vue-quill-editor':'VueQuillEditor'
            })
        })
    config.when(process.env.NODE_ENV === 'development',config =>{
         config.entry('app').clear().add('./src/main-dev.js')
        })
    }
}